import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 餐车和盒配置信息 */
export interface RobotInfo {
          id: number; // ID
          sn?: string; // 编号
          name?: string; // 名称
          modelSn?: string; // 型号
          intor: string; // 描述
  }

// 餐车和盒配置 API
export const RobotInfoApi = {
  // 查询餐车和盒配置分页
  getRobotInfoPage: async (params: any) => {
    return await request.get({ url: `/rbt/robot-info/page`, params })
  },

  // 查询餐车和盒配置详情
  getRobotInfo: async (id: number) => {
    return await request.get({ url: `/rbt/robot-info/get?id=` + id })
  },

  // 新增餐车和盒配置
  createRobotInfo: async (data: RobotInfo) => {
    return await request.post({ url: `/rbt/robot-info/create`, data })
  },

  // 修改餐车和盒配置
  updateRobotInfo: async (data: RobotInfo) => {
    return await request.put({ url: `/rbt/robot-info/update`, data })
  },

  // 删除餐车和盒配置
  deleteRobotInfo: async (id: number) => {
    return await request.delete({ url: `/rbt/robot-info/delete?id=` + id })
  },

  /** 批量删除餐车和盒配置 */
  deleteRobotInfoList: async (ids: number[]) => {
    return await request.delete({ url: `/rbt/robot-info/delete-list?ids=${ids.join(',')}` })
  },

  // 导出餐车和盒配置 Excel
  exportRobotInfo: async (params) => {
    return await request.download({ url: `/rbt/robot-info/export-excel`, params })
  }
}